In many places, there was an #ifdef/#else block that selected one of two implmentations of rebind_alloc based on whether or not we had template aliases. Create a helper struct to encapsulate that bit of logic, and replace all the ifdefs with uses of that struct. No functionality change intented. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@234296 91177308-0d34-0410-b5e6-96231b3b80d8 
diff --git a/include/list b/include/list index c1a7a18..d39f076 100644 --- a/include/list +++ b/include/list 
@@ -515,13 +515,7 @@  typedef __list_const_iterator<value_type, __void_pointer> const_iterator;  typedef __list_node_base<value_type, __void_pointer> __node_base;  typedef __list_node<value_type, __void_pointer> __node; - typedef typename __alloc_traits::template -#ifndef _LIBCPP_HAS_NO_TEMPLATE_ALIASES - rebind_alloc<__node> -#else - rebind_alloc<__node>::other -#endif - __node_allocator; + typedef typename __rebind_alloc_helper<__alloc_traits, __node>::type __node_allocator;  typedef allocator_traits<__node_allocator> __node_alloc_traits;  typedef typename __node_alloc_traits::pointer __node_pointer;  typedef typename __node_alloc_traits::pointer __node_const_pointer; @@ -529,13 +523,7 @@  typedef typename __alloc_traits::const_pointer const_pointer;  typedef typename __alloc_traits::difference_type difference_type;   - typedef typename __alloc_traits::template -#ifndef _LIBCPP_HAS_NO_TEMPLATE_ALIASES - rebind_alloc<__node_base> -#else - rebind_alloc<__node_base>::other -#endif - __node_base_allocator; + typedef typename __rebind_alloc_helper<__alloc_traits, __node_base>::type __node_base_allocator;  typedef typename allocator_traits<__node_base_allocator>::pointer __node_base_pointer;    __node_base __end_;